package com.example.sxt_practise.集合;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Collection;
import java.util.List;

/**
 * @Author gaofeng
 * @Description //TODO 
 * @Date  2021/6/26 0:01
 * @Param 
 * @param null
 * @return 
 * @return null
 */

public class TestCollection {
    public static void main(String[] args) {
//        int[] intArray =  {4,9,5,8,1,3,0,7 };
       /* List<Integer> intArray = new ArrayList<>() ;
        intArray.add(4) ;
        intArray.add(49) ;
        intArray.add(14) ;
        intArray.add(54) ;
        intArray.add(8) ;
        intArray.add(46) ;
        intArray.add(41) ;
        ArrayList<List<Integer>> objects = new ArrayList<>();
        objects.add(intArray);
        System.out.println(max(objects)) ;

        BigDecimal bigDecimal = new BigDecimal(0);
        BigDecimal bigDecimal2 = new BigDecimal(0);*/
       /* if (bigDecimal.subtract(bigDecimal2) > 0) {
            System.out.println("shide");
        }*/

        String minusDays = LocalDate.parse("2021-06-01", DateTimeFormatter.ofPattern("yyyy-MM-dd")).minusDays(1).toString();
        System.out.println(minusDays);

        System.out.println(LocalDate.now().minusMonths(1).minusDays(1).toString());


    }

    /**
     * @Author gaofeng
     * @Description //TODO 
     * @Date  2021/6/26 0:01
     * @Param 
     * @param c
     * @return 
     * @return T
     */
    public static <T extends List> T max(Collection<T> c) {
//        if (c.isEmpty()) {
//            throw new NoSuchElementException() ;
//        }
//        Iterator<T> iterator = c.iterator() ;
//        T largest = iterator.next(); ;
//        while (iterator.hasNext()) {
//            T next = iterator.next() ;
//            if (largest.compareTo(next) < 0) {
//                largest = next ;
//            }
//        }
        return null ;
    }
}
